function U = ssmap(u)

% form a skew symmetric matrix from u
% this corresponds the the operators applied to v
% in the operation w = u cross v
% ie w = Uv

if(length(u) ~= 3 )
    error('this only is defined for R^3 vectors...');
end

U = zeros(3,3);
U(2,1) = u(3);
U(3,1) = -u(2);
U(1,2) = -u(3);
U(1,3) = u(2);
U(2,3) = -u(1);
U(3,2) = u(1);